<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script>
        'use strict';
        var now = new Date();
        console.log(now.getFullYear()+"年"); //年
        console.log(now.getMonth()+"月"); //月
        console.log(now.getDate()+"日"); //日
        console.log("星期"+now.getDay()); //星期
        console.log(now.getHours()+"时"); //时
        console.log(now.getMinutes()+"分"); //分
        console.log(now.getSeconds()+"秒"); //秒
        console.log("时间戳:"+now.getTime()); //从1970.1.1 00：00

    </script>

</head>
<body>

</body>
</html>